package com.wxzz.elearing.course.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wxzz.elearing.course.dto.*;
import com.wxzz.elearing.course.entity.*;
import com.wxzz.elearning.common.vo.JgPageVo;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


public interface ITrainSurveyService extends IService<TrainSurvey> {

    /**
     * 新增或修改培训调查(后台)
     *
     * @param trainSurvey
     * @return
     */
    ReturnVO saveTrainSurvey(TrainSurvey trainSurvey);

    /**
     * 删除培训调查
     * @param trainSurveyId
     * @return
     */
    ReturnVO deleteTrainSurvey(Long trainSurveyId);

    /**
     * 培训调查列表(后台)
     *
     * @param trainSurveyDto
     * @return
     */
    ReturnVO<JgPageVo<List<TrainSurvey>>> listTrainSurvey(Long enterpriseId, TrainSurveyDto trainSurveyDto);

    /**
     * 查询当前用户培训调查
     * @param wxUserId
     * @param trainSurveyByWxUserDto
     * @return
     */
    ReturnVO<JgPageVo<List<TrainSurvey>>> listTrainSurveyByWxUserId(Long wxUserId, TrainSurveyByWxUserDto trainSurveyByWxUserDto);

    /**
     * 根据id查询培训调查详情(后台)
     *
     * @param trainSurveyId
     * @return
     */
    ReturnVO<TrainSurvey> selectTrainSurveyDetail(Long trainSurveyId);

    /**
     * 根据id查询培训调查人员(后台)
     *
     * @return
     */
    ReturnVO<JgPageVo<List<WxUserTrainSurvey>>> selectWxUserTrainSurveyByTrainSurveyId(WxUserTrainSurveyDto wxUserTrainSurveyDto);

    /**
     * 列出培训调查记录
     * @param wxUserId
     * @param trainSurveyId
     * @return
     */
    ReturnVO<List<CurriculumSectionTopic>> listTrainSurveyByTrainSurveyHistory(Long wxUserId, Long trainSurveyId);


    /**
     * 分配考试人(后台)
     *
     * @return
     */
    ReturnVO saveWxUserTrainSurvey(WxUserTrainSurveyInsDto wxUserTrainSurveyInsDto);

    /**
     * 根据id查询培训调查详情(小程序)
     *
     * @param trainSurveyId
     * @return
     */
    ReturnVO<TrainSurvey> wxSelectTrainSurveyDetail(Long wxUserId,Long trainSurveyId);

    /**
     * 培训调查结算调用
     *
     * @param trainSurveyIsPassDto
     * @return
     */
    ReturnVO isPassTrainSurvey(Long wxUserId, TrainSurveyIsPassDto trainSurveyIsPassDto);

    /**
     * 培训调查题导入
     *
     * @param token
     * @param file
     * @return
     */
    ReturnVO importTopicSection(String token, Long trainSurveyId, MultipartFile file);

    /**
     * 查询培训调查绑定的用户(远程调用)
     *
     * @param trainSurveyId
     * @param wxUserIds
     * @return
     */
    ReturnVO<List<JSONObject>> selectWxUserTrainSurvey(Long trainSurveyId, List<Long> wxUserIds);

}
